home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / mindim20.zip / README.TXT < prev    next >
Text File  |  1993-01-08  |  5KB  |  127 lines

  1. MindImages - Documentation for P.C. version 2.00: 7 Jan 1993
  2.  
  3.    V.G.A. required to view the images
  4.    (unless there is sufficient demand for support of other graphics adapters).
  5.    PostScript can be generated on other graphics types.
  6.  
  7. Program conceived and created by:
  8.  
  9.  Eric Thompson   : E.Thompson@newcastle.ac.uk
  10.  Rob Scott       : Robert.Scott@newcastle.ac.uk
  11.  Gordon Flanagan : G.J.Flanagan@newcastle.ac.uk
  12.  
  13. To run MindImages from a dos prompt type:
  14.  
  15. MINDIMG
  16.  
  17.  
  18. Description:
  19. ============
  20.  
  21.  MindImages was written to allow the creation of single image random dot
  22. stereograms (sirds) from compressed depth information. The compression format
  23. was specifically designed to allow direct transmission across the Internet
  24. to the newsgroup alt.3d, where the interest in sirds has snowballed in the
  25. last few months, thanks to Andy Kinsmans' Torus - a couple of hundred K
  26. postscript bit image.
  27.  
  28.  Needless to say, postscript images take up a lot of network bandwidth, so
  29. it was decided to take the original depth information, compress it and
  30. transmit the much smaller (5 - 30K typ.) files.
  31.  
  32.  MindImages will take the files as input and create either:
  33.    
  34.   An on screen black and white rds,
  35.   An on screen red/green or red/blue stereogram (use coloured glasses)
  36.   A postscript bit image to throw at your postscript printer.
  37.  
  38.  
  39. Viewing sirds:
  40. ==============
  41.  
  42.  There are two ways to view these stereograms. These are:
  43.         
  44.             1) wide eyed.
  45.             2) cross eyed.
  46.  
  47.  Both will create a 3d image in the brain, but the image will be inverted
  48. using one way as opposed to the other. That is to say, parts of the image
  49. which are raised when viewed wide eyed will descend into the screen or paper
  50. if viewed cross eyed.
  51.  
  52.  It is helpful when starting to put two small pieces of blu-tac or coloured
  53. sticky tape on the top of the monitor. These should be at exactly 1/5 of 
  54. the display window apart, in the centre.
  55.  
  56.  With the stereogram on the monitor or piece of paper:
  57.  
  58.   1) At about 30 - 50 cm from the display, focus on a point directly
  59. behind (3 metres or more away) so that the two marks are out of focus and
  60. have split into four marks. Now, by adjusting your focus/distance try to
  61. get the right hand mark as seen by the left eye and the left hand mark as
  62. seen by the right eye to converge. When these lock together, keep the same
  63. dopey look and allow your eyes to drop down onto the random pattern - 
  64. you should now be smiling as the 3d picture appears from nowhere.
  65.  
  66.   2) At a distance that is comfortable, cross your eyes until you have
  67. three marks in focus and gaze at the random pattern as above.
  68.  
  69. Note: If you are using the screen display, *Density 128 makes the picture
  70. easier to see for most people, whereas *Density 200 is easier for a
  71. postscript image (and saves toner).
  72.  
  73.  
  74. Compressed file format:
  75. =======================
  76.  
  77.  [You need only read this if you are curious]
  78.  
  79.  The first line of the compressed file contains a copyright message
  80. terminated by a line feed and/or carriage return.
  81.  
  82.  The following lines are separated by line feeds and/or carriage returns
  83. at a convenient line width (usually 75 chars). These separators are ignored
  84. by the program.
  85.  
  86.  The next two bytes refer to the xcale and yscale respectively. The largest
  87. size handled being 512x by 512y (xscale=1 yscale=1). An xscale of 2 and
  88. yscale of 4 would describe depth info of a 256x by 128y grid. The scale
  89. values are added to 33 to get them into the ascii range (this would have
  90. been 32, the space character, but some terminals/machines strip trailing
  91. spaces).
  92.  
  93.  In this case, the depth value has been limited to the range 0 - 63,
  94. conveniently leaving 30 unused values in the ascii range after adding the
  95. 33 offset. Total range here is 33 to 126.
  96.  
  97.  In creating the output file, a variation of run length encoding is used to
  98. fill a large buffer with depth values and running counts (up to 96)
  99. i.e. if there are 12 horizontal values of depth 25 then the buffer would
  100. contain 25,12,...
  101.  
  102. Now the unused ascii values come into play:
  103.  We can look at the previous 30 colour/count combinations (or up to the 
  104. current number of combinations processed-2 if we have done less than 30)
  105. and if we find that this 25,12 combination has appeared within this range
  106. at say, the 14th position back, then we would place the single value:
  107.  
  108.                     33+63+14=110 in our output file.
  109.  
  110.  If however, this colour/count combination did not exist within this range,
  111. then we would place the values:
  112.  
  113.                 33+colour and 33+count in our output file.
  114.  
  115. Thus if repeated values are present we reduce the total number of bytes
  116. needed even further.
  117.  
  118.  The last valid byte in the output file is a checksum which is the sum of all
  119. the bytes in the title string that are greater than 32 added to (the sum of
  120. all the succeeding bytes in the output file - 33, ignoring line feeds etc).
  121.  
  122.  Now take this number MOD 64 and add 33 ...done!
  123.   
  124.  The checksum allows a check on file integrity and helps to protect the
  125. copyright string at the start which will be printed at the top left hand
  126. corner of the printed image.
  127.